package com.service.sso.sdk.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
public class SSOConfig {
    @Value("${sso.host}")
    private String host;
    @Value("${sso.loginUrl:/user/login}")
    private String loginUrl;
    @Value("${sso.verifyToken:/api/verifyToken}")
    private String verifyToken;
    @Value("${sso.logoutUrl:/api/logout}")
    private String logoutUrl;

    public String getHost() {
        return host;
    }

    public String getLoginUrl() {
        return getHost() + loginUrl;
    }

    public String getVerifyToken() {
        return getHost() + verifyToken;
    }

    public String getLogoutUrl() {
        return getHost() + logoutUrl;
    }
}
